package com.ist.viewpagerhelper.bean;

import android.view.View;

import java.util.List;

/**
 * Created by Administrator on 2017/10/31.
 */

public class ViewPagerBean {

    public View viewPager;
    public View bottomLayout;
    public View openview;
    public int count;
    public  Object[] objects;
    public  int mode;
    public List<View> views;
    public ViewPagerBean(Builder builder) {
        this.viewPager = builder.viewPager;
        this.bottomLayout = builder.bottomLayout;
        this.openview = builder.openview;
        this.count = builder.count;
        this.objects = builder.objects;
        this.mode = builder.mode;
        this.views = builder.views;
    }



    public static class Builder{
        View viewPager;
        View bottomLayout;
        View openview;
        int count;
        Object[] objects;
        List<View> views;
        int mode;
        public Builder setViewPager(View viewPager){
            this.viewPager = viewPager;
            return this;
        }
        public Builder setIndicator(View bottomLayout){
            this.bottomLayout = bottomLayout;
            return this;
        }
        public Builder setOpenView(View openView){
            this.openview = openView;
            return this;
        }
        public Builder setDataCount(int count){
            this.count = count;
            return this;
        }
        public Builder setDataObjects(Object[] objects){
            this.objects = objects;
            return this;
        }
        public Builder setDataObjects(List<View> views){
            this.views = views;
            return this;
        }
        public Builder setMode(int mode){
            this.mode = mode;
            return this;
        }
        public ViewPagerBean builder(){
            return new ViewPagerBean(this);
        }
    }

    @Override
    public String toString() {
        return "ViewPagerBean{" +
                "viewPager=" + viewPager +
                ", bottomLayout=" + bottomLayout +
                ", openview=" + openview +
                ", count=" + count +
                '}';
    }
}
